﻿using System.Data.Entity;
using RBS.Core.Model.Hotel;
using RBS.Core.Model;
namespace RBS.Web.API.Models
{
    public class ApiContext : DbContext
    {
        // 您可以向此文件中添加自定义代码。更改不会被覆盖。
        // 
        // 如果您希望只要更改模型架构，Entity Framework
        // 就会自动删除并重新生成数据库，则将以下
        // 代码添加到 Global.asax 文件中的 Application_Start 方法。
        // 注意: 这将在每次更改模型时销毁并重新创建数据库。
        // 
        // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<RBS.Web.API.Models.RBS.Web.APIContext>());

        public ApiContext() : base("name=APIContext")
        {
        }

        /// <summary>
        /// 数据字典
        /// </summary>
        public DbSet<SYS_DictInfo> DictInfo { get; set; } 
        /// <summary>
        /// 
        /// </summary>
        public DbSet<V_UserFriend> U_Friends { get; set; }
        public DbSet<U_User> U_User { get; set; }
        /// <summary>
        /// 评价
        /// </summary>
        public DbSet<U_Comment> Comment { get; set; }
        /// <summary>
        /// 评价
        /// </summary>
        public DbSet<V_Comment> VComment { get; set; } 
        /// <summary>
        /// 收藏
        /// </summary>
        public DbSet<U_Collect_Hotel> Collect { get; set; }


        #region 酒店相关
        public DbSet<H_Hotels> Hotels { get; set; }
        public DbSet<V_Hotel> VHotel { get; set; }
        public DbSet<H_Hotel_Img> HotelImg { get; set; }  
         public DbSet<H_Hotel_CookbookCategory> HotelCookbookCategory { get; set; }
         public DbSet<H_Hotel_Cookbook> HotelCookbook { get; set; }
         public DbSet<H_Hotel_Seat> HotelSeat { get; set; }
        #endregion
        #region 订单相关
         public DbSet<D_Order_Details> OrderDetails { get; set; }
         public DbSet<D_Order_Temp> OrderTemp { get; set; }
         public DbSet<D_Order> Order { get; set; }
         public DbSet<D_Guest> Guest { get; set; }
         public DbSet<V_Guest> VGuest { get; set; }
         public DbSet<D_CuiCai> CuiCai { get; set; }

    

        /// <summary>
        /// 状态跟踪
        /// </summary>
         public DbSet<D_OperateRecord> OperateRecord { get; set; } 
        #endregion 
         public DbSet<V_UserIntegration> U_User_Integration { get; set; }



        #region 视图
         /// <summary>
         /// 订单详细视图
         /// </summary>
         public DbSet<VOrderDetails> VOrderDetails { get; set; } 
         /// <summary>
         /// 订单视图
         /// </summary>
         public DbSet<V_Order> VOrder { get; set; }



         public DbSet<P_Order_User> OrderUser { get; set; }
        #endregion
    }
}
